<!--{if $_G['setting']['mobile']['mobilehotthread'] && $_GET['forumlist'] != 1}-->
	<!--{eval dheader('Location:forum.php?mod=guide&view=hot&mobile=2');exit;}-->
<!--{/if}-->
<!--{template common/header}-->

<script type="text/javascript">
	function getvisitclienthref() {
		var visitclienthref = '';
		if(ios) {
			visitclienthref = 'https://itunes.apple.com/cn/app/zhang-shang-lun-tan/id489399408?mt=8';
		} else if(andriod) {
			visitclienthref = 'http://www.discuz.net/mobile.php?platform=android';
		}
		return visitclienthref;
	}
</script>

<!--{if $_GET['visitclient']}-->

<header class="header">
    <div class="nav">
		<span>{lang warmtip}</span>
    </div>
</header>
<div class="cl">
	<div class="clew_con">
		<h2 class="tit">{lang zsltmobileclient}</h2>
		<p>{lang visitbbsanytime}<input class="redirect button" id="visitclientid" type="button" value="{lang clicktodownload}" href="" /></p>
		<h2 class="tit">{lang iphoneandriodmobile}</h2>
		<p>{lang visitwapmobile}<input class="redirect button" type="button" value="{lang clicktovisitwapmobile}" href="$_GET[visitclient]" /></p>
	</div>
</div>
<script type="text/javascript">
	var visitclienthref = getvisitclienthref();
	if(visitclienthref) {
		$('#visitclientid').attr('href', visitclienthref);
	} else {
		window.location.href = '$_GET[visitclient]';
	}
</script>

<!--{else}-->

<!-- header start -->
<!--{if $showvisitclient}-->
<div class="visitclienttip vm" style="display:block;">
	<a href="javascript:;" id="visitclientid" class="btn_download">{lang downloadnow}</a>	
	<p>
		{lang downloadzslttoshareview}
	</p>
</div>
<script type="text/javascript">
	var visitclienthref = getvisitclienthref();
	if(visitclienthref) {
		$('#visitclientid').attr('href', visitclienthref);
		$('.visitclienttip').css('display', 'block');
	}
</script>
<!--{/if}-->

<!-- header start -->
<div class="bz-header">
	<div class="bz-header-left">
		<a href="javascript:history.back();" class="iconfont icon-fanhui"></a>
	</div>
	<h2>$_G['setting']['bbname']</h2>
	<div class="bz-header-right">
		<a href="<!--{if $_GET['mod'] == 'forumdisplay' || $_GET['mod'] == 'viewthread'}-->forum.php?mod=post&action=newthread&fid=$_G['fid']<!--{else}-->forum.php?mod=misc&action=nav<!--{/if}-->" class="iconfont icon-fatie"></a>
	</div>
</div>
<div class="banzhuan-top"></div>
<!-- header end -->

<!--{hook/index_top_mobile}-->

<!-- main forumlist start -->
<div class="banzhuan-h10"></div>
<!--{if empty($gid)}-->
	<div id="chart" class="cl bz-bg-fff bz-p10">
		<ul>
			<li>
				<span>{lang index_today}</span>
				<em style="color: #F74C31; font-weight: 700;">$todayposts</em>
			</li>
			<li>
				<span>{lang index_posts}</span>
				<em>$posts</em>
			</li>
			<li>
				<span>{lang index_members}</span>
				<em>$_G['cache']['userstats']['totalmembers']</em>
			</li>
		</ul>
	</div>
<!--{/if}-->

{if $_G[uid]}
<!--{if empty($gid) && !empty($forum_favlist)}-->
	<div>
		<div class="subforumshow bm_h cl banzhuan-clear bz-mt10" href="#sub_forum_0">
			<span class="o">
				<em class="<!--{if !$_G[setting][mobile][mobileforumview]}-->iconfont icon-kaiguan-kai color-green icon-kaiguan-guan color-b<!--{/if}-->"></em>
			</span>
			<h2><a href="javascript:;">{lang forum_myfav}</a></h2>
		</div>
		<div id="sub_forum_0" class="sub_forum">
			<ul>
				<!--{eval $forumscount = count($forum_favlist);}-->
				<!--{eval $forumcolumns = $forumscount > 3 ? ($forumscount == 4 ? 4 : 5) : 1;}-->
				<!--{eval $forumcolwidth = (floor(100 / $forumcolumns) - 0.1).'%';}-->
			
				<!--{eval $favorderid = 0;}-->
			
				<!--{loop $forum_favlist $key $favorite}-->
				<!--{if $favforumlist[$favorite[id]]}-->
				<!--{eval $forum=$favforumlist[$favorite[id]];}-->
				<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
			
				<!--{if $forumcolumns>1}-->
				<li>
					<div class="name-pic">
						<!--{if $forum[icon]}-->
						$forum[icon]
						<!--{else}-->
						<a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
							<span class="nopic" style="width:100%; height:100%;"></span>
						</a>
						<!--{/if}-->
					</div>
					<div class="name-tit">
						<a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
							$forum[name]
							<p>
								<!--{if $forum[todayposts] > 0}-->
								<span style="color: #F74C31;">{lang index_today} <em>$forum[todayposts]</em></span>
								<!--{else}-->
								<span>{lang index_threads} <em>$forum[threads]</em></span>
								<!--{/if}-->
							</P>
						</a>
					</div>
				</li>
			
				<!--{eval $favorderid++;}-->
			
				<!--{else}-->
				<li>
					<div class="name-pic">
						<!--{if $forum[icon]}-->
						$forum[icon]
						<!--{else}-->
						<a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
							<span class="nopic" style="width:100%; height:100%;"></span>
						</a>
						<!--{/if}-->
					</div>
					<div class="name-tit">
						<a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
							$forum[name]
								<p>
									<!--{if $forum[todayposts] > 0}-->
									<span style="color: #F74C31;">{lang index_today} <em>$forum[todayposts]</em></span>
									<!--{else}-->
									<span>{lang index_threads} <em>$forum[threads]</em></span>
									<!--{/if}-->
								</P>
						</a>
					</div>
				</li>
				<!--{/if}-->
				<!--{/if}-->
				<!--{/loop}-->
			</ul>
		</div>
	</div>
<!--{/if}-->
{else}
	<div class="subforumshow bm_h cl banzhuan-clear bz-mt10" href="#sub_forum_0">
		<span class="o">
			<em class="<!--{if !$_G[setting][mobile][mobileforumview]}-->iconfont icon-kaiguan-kai color-green icon-kaiguan-guan color-b<!--{/if}-->"></em>
		</span>
		<h2><a href="javascript:;">{lang forum_myfav}</a></h2>
	</div>
	<div id="sub_forum_0" style="text-align: center; background: #FFFFFF; padding: 30px 0;">
		<a href="{if $_G[uid]}home.php?mod=space&uid=$_G[uid]&do=profile&mycenter=1{else}member.php?mod=logging&action=login{/if}" class="color-b" style="font-size: 14px;">
			{lang login}{lang show}{lang forum_myfav}
		</a>
	</div>
{/if}

<div class="bz-mtb10" id="wp">
	<!--{loop $catlist $key $cat}-->
	<div class="bz-mb10 banzhuan-clear">
		<div class="subforumshow bm_h cl banzhuan-clear" href="#sub_forum_$cat[fid]">
			<span class="o">
				<em class="<!--{if !$_G[setting][mobile][mobileforumview]}-->iconfont icon-kaiguan-kai color-green icon-kaiguan-guan color-b<!--{/if}-->"></em>
			</span>
		    <h2><a href="javascript:;">$cat[name]</a></h2>
		</div>
		<div id="sub_forum_$cat[fid]" class="sub_forum">
			<ul>
				<!--{loop $cat[forums] $forumid}-->
				<!--{eval $forum=$forumlist[$forumid];}-->
				<!--{eval $forumurl = !empty($forum['domain']) && !empty($_G['setting']['domain']['root']['forum']) ? 'http://'.$forum['domain'].'.'.$_G['setting']['domain']['root']['forum'] : 'forum.php?mod=forumdisplay&fid='.$forum['fid'];}-->
				<li>
					<div class="name-pic">
	                    <!--{if $forum[icon]}-->
	                        {$forum[icon]}
	                    <!--{else}-->
	                        <a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
	                            <span class="nopic" style="width:100%; height:100%;"></span>
	                        </a>
	                    <!--{/if}-->
				    </div>
                    	<div class="name-tit">
                    		<a href="forum.php?mod=forumdisplay&fid={$forum['fid']}&filter=lastpost&orderby=lastpost&mobile=2">
                    			{$forum[name]}
                    	        <p>
                    	        	<!--{if $forum[todayposts] > 0}-->
                    	        	    <span style="color: #F74C31;">{lang index_today} <em>$forum[todayposts]</em></span>
                    	        <!--{else}-->
                    	        	    <span>{lang index_threads} <em>$forum[threads]</em></span>
                    	        	<!--{/if}-->
                    	        </P>
                    	    </a>
                    	</div>
				</li>
				<!--{/loop}-->
			</ul>
		</div>
	</div>
	<!--{/loop}-->
</div>
<!-- main forumlist end -->

<!--{hook/index_middle_mobile}-->
<script type="text/javascript">
	(function() {
		<!--{if !$_G[setting][mobile][mobileforumview]}-->
			$('.sub_forum').css('display', 'block');
		<!--{else}-->
			$('.sub_forum').css('display', 'none');
		<!--{/if}-->
		$('.subforumshow').on('click', function() {
			var obj = $(this);
			var subobj = $(obj.attr('href'));
			if(subobj.css('display') == 'none') {
				subobj.css('display', 'block');
				obj.find('em').attr('class', 'iconfont icon-kaiguan-kai color-green');
			} else {
				subobj.css('display', 'none');
				obj.find('em').attr('class', 'iconfont icon-kaiguan-guan color-b');
			}
		});
	 })();
</script>
<!--{/if}-->

<div class="banzhuan-clear"></div>

<!--{template common/footer}-->